﻿using Common;
using Network.UpdateData;
using System.Net.Sockets;

namespace SFJDService.SocketHandle
{
    /// <summary>
    /// 接收到返回的data数据
    /// </summary>
    public class PH01GotData : PacketHandle
    {
        /// <summary>
        /// UDP, code 1011
        /// </summary>
        public PH01GotData(Socket socket, Packet packet) : base(socket, packet) { }

        protected override void Handle()
        {
            ClassData dat = new ClassData();
            if (Message.Equals("0"))
            {
                dat = null;
            }
            else
            {
                dat.DecodingFromString(Message);
            }
            Runtime.UsersOnLine.HandlerData(guidSend, this.GetIpSend(), dat);
        }
    }
}
